<!--
*Author：
 *Contact：
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/EQU_ToolModel.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/EQU_ToolModel.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'EQU_ToolModel_Id',
                footer: "Foots",
                cnName: '刀信息',
                name: 'workbusiness/EQU_ToolModel',
                url: "/EQU_ToolModel/",
                sortName: "CreateOn"
            });
            const editFormFields = ref({"ToolModel_Code":"","ToolLength":"","MeasureTemplate":"","RangeErrorMin":"","RangeErrorMax":"","RangeErrorRMin":"","RangeErrorRMax":""});
            const editFormOptions = ref([[{"title":"刀","field":"ToolModel_Code","type":"text"},
                               {"title":"刀长","field":"ToolLength","type":"decimal"},
                               {"title":"测量模板","required":true,"field":"MeasureTemplate","type":"text"}],
                              [{"title":"长的误差范围小","field":"RangeErrorMin","type":"decimal"},
                               {"title":"长的误差范围大","field":"RangeErrorMax","type":"decimal"},
                               {"title":"R的误差范围小","field":"RangeErrorRMin","type":"decimal"},
                               {"title":"R的误差范围大","field":"RangeErrorRMax","type":"decimal"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'EQU_ToolModel_Id',title:'EQU_ToolModel_Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ToolModel_Code',title:'刀',type:'string',link:true,width:110,align:'left',sort:true},
                       {field:'ToolLength',title:'刀长',type:'decimal',width:110,align:'left'},
                       {field:'Description',title:'描述',type:'string',width:220,hidden:true,align:'left'},
                       {field:'Status',title:'新建/激活/保留/废除',type:'string',width:110,hidden:true,align:'left'},
                       {field:'RangeErrorMin',title:'长的误差范围小',type:'decimal',width:110,align:'left'},
                       {field:'RangeErrorMax',title:'长的误差范围大',type:'decimal',width:110,align:'left'},
                       {field:'RangeErrorRMin',title:'R的误差范围小',type:'decimal',width:110,align:'left'},
                       {field:'RangeErrorRMax',title:'R的误差范围大',type:'decimal',width:110,align:'left'},
                       {field:'Img',title:'图',type:'string',width:220,hidden:true,align:'left'},
                       {field:'MeasureTemplate',title:'测量模板',type:'string',width:110,require:true,align:'left'},
                       {field:'HolderType',title:'刀柄类型',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
